﻿namespace Forms.My
{
    using Microsoft.VisualBasic.ApplicationServices;
    using Microsoft.VisualBasic.CompilerServices;

    using System;
    using System.CodeDom.Compiler;
    using System.ComponentModel;
    using System.Configuration;
    using System.Diagnostics;
    using System.Runtime.CompilerServices;

    [EditorBrowsable(EditorBrowsableState.Advanced), GeneratedCode("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0"), CompilerGenerated]
    public class MySettings : ApplicationSettingsBase
    {
        private static bool addedHandler;
        private static object addedHandlerLockObject = RuntimeHelpers.GetObjectValue(new object());
        private static MySettings defaultInstance = ((MySettings) SettingsBase.Synchronized(new MySettings()));

        public static MySettings _MySettingsProperty;
        public static MySettings MySettingsProperty
        {
            get
            {
                return _MySettingsProperty ?? (_MySettingsProperty = new MySettings());
            }
        }

        [EditorBrowsable(EditorBrowsableState.Advanced), DebuggerNonUserCode]
        private static void AutoSaveSettings(object sender, EventArgs e)
        {
            if (MyProject.Application.SaveMySettingsOnExit)
            {
                MySettingsProperty.Save();
            }
        }

        [UserScopedSetting, DefaultSettingValue("False"), DebuggerNonUserCode]
        public bool BMWBankInetImport
        {
            get
            {
                return Conversions.ToBoolean(this["BMWBankInetImport"]);
            }
            set
            {
                this["BMWBankInetImport"] = value;
            }
        }

        [DefaultSettingValue(""), DebuggerNonUserCode, UserScopedSetting]
        public string DatabasePath
        {
            get
            {
                return Conversions.ToString(this["DatabasePath"]);
            }
            set
            {
                this["DatabasePath"] = value;
            }
        }

        public static MySettings Default
        {
            get
            {
                if (!addedHandler)
                {
                    object addedHandlerLockObject = MySettings.addedHandlerLockObject;
                    ObjectFlowControl.CheckForSyncLockOnValueType(addedHandlerLockObject);
                    lock (addedHandlerLockObject)
                    {
                        if (!addedHandler)
                        {
                            MyProject.Application.Shutdown += new ShutdownEventHandler(MySettings.AutoSaveSettings);
                            addedHandler = true;
                        }
                    }
                }
                return defaultInstance;
            }
        }

        [UserScopedSetting, DefaultSettingValue("False"), DebuggerNonUserCode]
        public bool DoBackup
        {
            get
            {
                return Conversions.ToBoolean(this["DoBackup"]);
            }
            set
            {
                this["DoBackup"] = value;
            }
        }

        [UserScopedSetting, DefaultSettingValue(""), DebuggerNonUserCode]
        public string EasyArchiv
        {
            get
            {
                return Conversions.ToString(this["EasyArchiv"]);
            }
            set
            {
                this["EasyArchiv"] = value;
            }
        }

        [DebuggerNonUserCode, UserScopedSetting]
        public bool EasyExtern
        {
            get
            {
                return Conversions.ToBoolean(this["EasyExtern"]);
            }
            set
            {
                this["EasyExtern"] = value;
            }
        }

        [UserScopedSetting, DebuggerNonUserCode, DefaultSettingValue("")]
        public string EasyFeldname
        {
            get
            {
                return Conversions.ToString(this["EasyFeldname"]);
            }
            set
            {
                this["EasyFeldname"] = value;
            }
        }

        [DefaultSettingValue(""), DebuggerNonUserCode, UserScopedSetting]
        public string EasyMandant
        {
            get
            {
                return Conversions.ToString(this["EasyMandant"]);
            }
            set
            {
                this["EasyMandant"] = value;
            }
        }

        [DebuggerNonUserCode, DefaultSettingValue(""), UserScopedSetting]
        public string EasyPasswort
        {
            get
            {
                return Conversions.ToString(this["EasyPasswort"]);
            }
            set
            {
                this["EasyPasswort"] = value;
            }
        }

        [DefaultSettingValue(""), DebuggerNonUserCode, UserScopedSetting]
        public string EasyServerURL
        {
            get
            {
                return Conversions.ToString(this["EasyServerURL"]);
            }
            set
            {
                this["EasyServerURL"] = value;
            }
        }

        [DefaultSettingValue(""), UserScopedSetting, DebuggerNonUserCode]
        public string EasyUsername
        {
            get
            {
                return Conversions.ToString(this["EasyUsername"]);
            }
            set
            {
                this["EasyUsername"] = value;
            }
        }

        [DefaultSettingValue(""), UserScopedSetting, DebuggerNonUserCode]
        public string FilesBackupPath
        {
            get
            {
                return Conversions.ToString(this["FilesBackupPath"]);
            }
            set
            {
                this["FilesBackupPath"] = value;
            }
        }

        [DebuggerNonUserCode, DefaultSettingValue(""), UserScopedSetting]
        public string FilesPath
        {
            get
            {
                return Conversions.ToString(this["FilesPath"]);
            }
            set
            {
                this["FilesPath"] = value;
            }
        }

        [DebuggerNonUserCode, UserScopedSetting, DefaultSettingValue("False")]
        public bool UseTAPool
        {
            get
            {
                return Conversions.ToBoolean(this["UseTAPool"]);
            }
            set
            {
                this["UseTAPool"] = value;
            }
        }
    }
}

